package virtorina.client.room.dto;

import java.io.Serializable;

import org.datanucleus.metadata.ImplementsMetaData;

public class UserDTO implements Serializable, Comparable<UserDTO> {
	private static final long serialVersionUID = 1L;
	private Long userID;
	private String name;

	public UserDTO(Long iD, String name) {
		super();
		userID = iD;
		this.name = name;
	}

	public UserDTO() {

	}

	public Long getID() {
		return userID;
	}

	public void setID(Long iD) {
		userID = iD;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public int compareTo(UserDTO arg0) {
		int comp = this.name.compareTo(arg0.getName());
		if (comp==0){
			comp = this.userID.compareTo(arg0.userID);
		}
		return comp;
	}
}
